-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IBX-6413: Search Suggestion (Autocomplete for search) #33
Conversation
55f32b1
to
885f626
Compare
1705021
to
d8fb688
Compare
src/lib/EventDispatcher/EventListener/ContentSuggestionSubscriber.php
Outdated
Show resolved
Hide resolved
src/bundle/DependencyInjection/Configuration/Parser/SiteAccessAware/SuggestionParser.php
Outdated
Show resolved
Hide resolved
Also, SonarCloud seems to report some valid code smells. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd like to see an integration test for data serialization (encoding into JSON), because this is the crucial point and I think you might have a slight difference when there is 0, 1 and more items in the Location collection.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Integration tests, since those are missing on the package, can be postponed.
src/lib/Serializer/Normalizer/Suggestion/ContentSuggestionNormalizer.php
Show resolved
Hide resolved
src/lib/Serializer/Normalizer/Suggestion/ParentLocationCollectionNormalizer.php
Outdated
Show resolved
Hide resolved
@kisztof as we discussed we have an error with the number of displayed autocomplete search results. The configuration that we define in ibexa.yaml doesn't respect the provided value. For example I set Edit:: I can approve the pull request and we can fix the issue right after beta3 release as you requested. |
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
bd48916 |
Regression tests passed: |
Note
Related PR ibexa/admin-ui#959
Configuraton
Endpoint
Endpoint:
/suggestion?query=ala&limit=10
###Endpoint structure
Implementing custom DataSource
\Ibexa\Contracts\Search\Event\SuggestionEvent
New suggestion model
The new suggestion model ought to inherit from
\Ibexa\Contracts\Search\Model\Suggestion\Suggestion
Adding normalizers
Create your custom normalizer using implementation
Symfony\Component\Serializer\Normalizer\NormalizerInterface
Annotate your custom normalizer using the tag
ibexa.search.serializer.normalizer
and it will be automatically used by the serializer.Checklist:
$ composer fix-cs
)